package com.turnengine.client.local.player.plugin;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import com.turnengine.client.local.unit.bean.IUnitCount;

/**
 * Basic implementation which takes a list of units.
 */
public class PlayerSignupPlugin implements IPlayerSignupPlugin {

	private final List<IUnitCount> unitList;

	public PlayerSignupPlugin() {
		this(new ArrayList<IUnitCount>());
	}

	public PlayerSignupPlugin(List<IUnitCount> unitList) {
		if (unitList == null) {
			throw new NullPointerException("unitList");
		}
		this.unitList = unitList;
	}

	@Override
	public List<IUnitCount> getSignupUnitList() {
		return Collections.unmodifiableList(unitList);
	}

}
